import Vue from 'vue'
import Vuex from 'vuex'
import user from '@/store/modules/user'
import getters from './getters'

Vue.use(Vuex)

const store = new Vuex.Store({
	state:{
		 article: {
		      id: 0,
		      author: '',
		      summary: '',
		      content: '',
		      likes: 0,
		      coverImage:'',
		      title: '',
		      isLiked: false,
		    }
	},
	mutations:{
		 setArticle(state, article) {
		      state.article = article;
		    },
	},
	
	
  modules: {
    user
  },
  getters
})

export default store
